﻿#include "PhyscisPropUniformWapper.h"
#include "FITK_Kernel/FITKAppFramework/FITKMessage.h"

Uniform * PhyscisPropUniformWapper::new_Uniform()
{
    return new Uniform;
}
void PhyscisPropUniformWapper::delete_Uniform(Uniform * obj)
{
    if (obj) delete obj;
}

Uniform * PhyscisPropUniformWapper::static_Uniform_GetUniform(const QString & name)
{
    return new Uniform(name);
}

QString PhyscisPropUniformWapper::getName(Uniform * obj)
{
    if (obj)
        return obj->getName();
    return QString();
}

void PhyscisPropUniformWapper::setName(Uniform * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->setName(name);
    if (!ok) {
        AppFrame::FITKMessageError("Set Name failed !");
    }
}

void PhyscisPropUniformWapper::setMaterial(Uniform * obj, const QString & material)
{
    if (!obj)return;
    bool ok = obj->setMaterial(material);
    if (!ok) {
        AppFrame::FITKMessageError("Set Material failed !");
    }
}

void PhyscisPropUniformWapper::setThickness(Uniform * obj, double thickness)
{
    if (!obj)return;
    bool ok = obj->setThickness(thickness);
    if (!ok) {
        AppFrame::FITKMessageError("Set Thickness failed !");
    }
}

void PhyscisPropUniformWapper::createPhyscisProp(Uniform * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->createPhyscisProp(name);
    if (!ok) {
        AppFrame::FITKMessageError("Create Physcis Property failed !");
    }
}

Uniform::Uniform(const QString & name) :
    Acoustics::PyFITKPhyscisPropUniform(name)
{
}

Uniform::Uniform() :
    Acoustics::PyFITKPhyscisPropUniform()
{
}
